package com.example.webtest.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/test")
public class Hello {

    @PostMapping("/hello")
    @ResponseBody
    public List<Map> hello(@RequestParam  String aa ){
        System.out.println(aa);
        List<Map> list=new ArrayList<>();
        HashMap<String,Object> map=new HashMap<>();
        map.put(aa,"first");
        list.add(map);
        return list;
                //"Welcome to my website!";
    }



    @PostMapping("/next")
    @ResponseBody
    public String next()
    {
        return "next";
    }
}